
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh_CN">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Python 教程 &#8212; Python 3.7.3 文档</title>
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script type="text/javascript" src="../_static/translations.js"></script>
    
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    
    <link rel="search" type="application/opensearchdescription+xml"
          title="在 Python 3.7.3 文档 中搜索"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="关于这些文档" href="../about.html" />
    <link rel="index" title="索引" href="../genindex.html" />
    <link rel="search" title="搜索" href="../search.html" />
    <link rel="copyright" title="版权所有" href="../copyright.html" />
    <link rel="next" title="1. 课前甜点" href="appetite.html" />
    <link rel="prev" title="更新日志" href="../whatsnew/changelog.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <link rel="canonical" href="https://docs.python.org/3/tutorial/index.html" />
    
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    <script type="text/javascript" src="../_static/switchers.js"></script>
    
    
    
    <style>
      @media only screen {
        table.full-width-table {
            width: 100%;
        }
      }
    </style>
 

  </head><body>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>导航</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="总目录"
             accesskey="I">索引</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python 模块索引"
             >模块</a> |</li>
        <li class="right" >
          <a href="appetite.html" title="1. 课前甜点"
             accesskey="N">下一页</a> |</li>
        <li class="right" >
          <a href="../whatsnew/changelog.html" title="更新日志"
             accesskey="P">上一页</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <span class="language_switcher_placeholder">zh_CN</span>
          <span class="version_switcher_placeholder">3.7.3</span>
          <a href="../index.html">文档</a> &#187;
        </li>

    <li class="right">
        

    <div class="inline-search" style="display: none" role="search">
        <form class="inline-search" action="../search.html" method="get">
          <input placeholder="快速搜索" type="text" name="q" />
          <input type="submit" value="转向" />
          <input type="hidden" name="check_keywords" value="yes" />
          <input type="hidden" name="area" value="default" />
        </form>
    </div>
    <script type="text/javascript">$('.inline-search').show(0);</script>
         |
    </li>

      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="the-python-tutorial">
<span id="tutorial-index"></span><h1>Python 教程<a class="headerlink" href="#the-python-tutorial" title="永久链接至标题">¶</a></h1>
<p>Python 是一种易于学习又功能强大的编程语言。它提供了高效的高级数据结构，还有简单有效的面向对象编程。Python 优雅的语法和动态类型，以及解释型语言的本质，使它成为多数平台上写脚本和快速开发应用的理想语言。</p>
<p>Python 解释器及丰富的标准库以源码或机器码的形式提供，可以到 Python 官网 <a class="reference external" href="https://www.python.org/">https://www.python.org/</a> 免费获取适用于各个主要系统平台的版本，并可自由地分发。这个网站还包含许多免费第三方 Python 模块、程序和工具以及附加文档的发布页面或链接。</p>
<p>Python 解释器易于扩展，可以使用 C 或 C++（或者其他可以通过 C 调用的语言）扩展新的功能和数据类型。Python 也可用于可定制化软件中的扩展程序语言。</p>
<p>这个教程非正式地介绍 Python 语言和系统的基本概念和功能。最好在阅读的时候准备一个 Python 解释器进行练习，不过所有的例子都是相互独立的，所以这个教程也可以离线阅读。</p>
<p>有关标准的对象和模块，参阅 <a class="reference internal" href="../library/index.html#library-index"><span class="std std-ref">Python 标准库</span></a>。<a class="reference internal" href="../reference/index.html#reference-index"><span class="std std-ref">Python 语言参考</span></a> 提供了更正式的语言参考。想要编写 C 或者 C++ 扩展可以参考 <a class="reference internal" href="../extending/index.html#extending-index"><span class="std std-ref">扩展和嵌入 Python 解释器</span></a> 和 <a class="reference internal" href="../c-api/index.html#c-api-index"><span class="std std-ref">Python/C API 参考手册</span></a>。也有不少书籍深入讲解Python 。</p>
<p>这个教程并没有完整包含每一个功能，甚至常用功能可能也没有全部涉及。这个教程只介绍 Python 中最值得注意的功能，也会让你体会到这个语言的风格特色。学习完这个教程，你将可以阅读和编写 Python 模块和程序，也可以开始学习更多的 Python 库模块，详见 <a class="reference internal" href="../library/index.html#library-index"><span class="std std-ref">Python 标准库</span></a>。</p>
<p><a class="reference internal" href="../glossary.html#glossary"><span class="std std-ref">术语表</span></a> 也很值得阅读一下。</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="appetite.html">1. 课前甜点</a></li>
<li class="toctree-l1"><a class="reference internal" href="interpreter.html">2. 使用 Python 解释器</a><ul>
<li class="toctree-l2"><a class="reference internal" href="interpreter.html#invoking-the-interpreter">2.1. 调用解释器</a><ul>
<li class="toctree-l3"><a class="reference internal" href="interpreter.html#argument-passing">2.1.1. 传入参数</a></li>
<li class="toctree-l3"><a class="reference internal" href="interpreter.html#interactive-mode">2.1.2. 交互模式</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="interpreter.html#the-interpreter-and-its-environment">2.2. 解释器的运行环境</a><ul>
<li class="toctree-l3"><a class="reference internal" href="interpreter.html#source-code-encoding">2.2.1. 源文件的字符编码</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">3. Python 的非正式介绍</a><ul>
<li class="toctree-l2"><a class="reference internal" href="introduction.html#using-python-as-a-calculator">3.1. Python 作为计算器使用</a><ul>
<li class="toctree-l3"><a class="reference internal" href="introduction.html#numbers">3.1.1. 数字</a></li>
<li class="toctree-l3"><a class="reference internal" href="introduction.html#strings">3.1.2. 字符串</a></li>
<li class="toctree-l3"><a class="reference internal" href="introduction.html#lists">3.1.3. 列表</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="introduction.html#first-steps-towards-programming">3.2. 走向编程的第一步</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="controlflow.html">4. 其他流程控制工具</a><ul>
<li class="toctree-l2"><a class="reference internal" href="controlflow.html#if-statements">4.1. <code class="xref std std-keyword docutils literal notranslate"><span class="pre">if</span></code> 语句</a></li>
<li class="toctree-l2"><a class="reference internal" href="controlflow.html#for-statements">4.2. <code class="xref std std-keyword docutils literal notranslate"><span class="pre">for</span></code> 语句</a></li>
<li class="toctree-l2"><a class="reference internal" href="controlflow.html#the-range-function">4.3. <code class="docutils literal notranslate"><span class="pre">range()</span></code> 函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="controlflow.html#break-and-continue-statements-and-else-clauses-on-loops">4.4. <code class="xref std std-keyword docutils literal notranslate"><span class="pre">break</span></code> 和 <code class="xref std std-keyword docutils literal notranslate"><span class="pre">continue</span></code> 语句，以及循环中的 <code class="xref std std-keyword docutils literal notranslate"><span class="pre">else</span></code> 子句</a></li>
<li class="toctree-l2"><a class="reference internal" href="controlflow.html#pass-statements">4.5. <code class="xref std std-keyword docutils literal notranslate"><span class="pre">pass</span></code> 语句</a></li>
<li class="toctree-l2"><a class="reference internal" href="controlflow.html#defining-functions">4.6. 定义函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="controlflow.html#more-on-defining-functions">4.7. 函数定义的更多形式</a><ul>
<li class="toctree-l3"><a class="reference internal" href="controlflow.html#default-argument-values">4.7.1. 参数默认值</a></li>
<li class="toctree-l3"><a class="reference internal" href="controlflow.html#keyword-arguments">4.7.2. 关键字参数</a></li>
<li class="toctree-l3"><a class="reference internal" href="controlflow.html#arbitrary-argument-lists">4.7.3. 任意的参数列表</a></li>
<li class="toctree-l3"><a class="reference internal" href="controlflow.html#unpacking-argument-lists">4.7.4. 解包参数列表</a></li>
<li class="toctree-l3"><a class="reference internal" href="controlflow.html#lambda-expressions">4.7.5. Lambda 表达式</a></li>
<li class="toctree-l3"><a class="reference internal" href="controlflow.html#documentation-strings">4.7.6. 文档字符串</a></li>
<li class="toctree-l3"><a class="reference internal" href="controlflow.html#function-annotations">4.7.7. 函数标注</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="controlflow.html#intermezzo-coding-style">4.8. 小插曲：编码风格</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="datastructures.html">5. 数据结构</a><ul>
<li class="toctree-l2"><a class="reference internal" href="datastructures.html#more-on-lists">5.1. 列表的更多特性</a><ul>
<li class="toctree-l3"><a class="reference internal" href="datastructures.html#using-lists-as-stacks">5.1.1. 列表作为栈使用</a></li>
<li class="toctree-l3"><a class="reference internal" href="datastructures.html#using-lists-as-queues">5.1.2. 列表作为队列使用</a></li>
<li class="toctree-l3"><a class="reference internal" href="datastructures.html#list-comprehensions">5.1.3. 列表推导式</a></li>
<li class="toctree-l3"><a class="reference internal" href="datastructures.html#nested-list-comprehensions">5.1.4. 嵌套的列表推导式</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="datastructures.html#the-del-statement">5.2. <code class="xref std std-keyword docutils literal notranslate"><span class="pre">del</span></code> 语句</a></li>
<li class="toctree-l2"><a class="reference internal" href="datastructures.html#tuples-and-sequences">5.3. 元组和序列</a></li>
<li class="toctree-l2"><a class="reference internal" href="datastructures.html#sets">5.4. 集合</a></li>
<li class="toctree-l2"><a class="reference internal" href="datastructures.html#dictionaries">5.5. 字典</a></li>
<li class="toctree-l2"><a class="reference internal" href="datastructures.html#looping-techniques">5.6. 循环的技巧</a></li>
<li class="toctree-l2"><a class="reference internal" href="datastructures.html#more-on-conditions">5.7. 深入条件控制</a></li>
<li class="toctree-l2"><a class="reference internal" href="datastructures.html#comparing-sequences-and-other-types">5.8. 序列和其它类型的比较</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">6. 模块</a><ul>
<li class="toctree-l2"><a class="reference internal" href="modules.html#more-on-modules">6.1. 有关模块的更多信息</a><ul>
<li class="toctree-l3"><a class="reference internal" href="modules.html#executing-modules-as-scripts">6.1.1. 以脚本的方式执行模块</a></li>
<li class="toctree-l3"><a class="reference internal" href="modules.html#the-module-search-path">6.1.2. 模块搜索路径</a></li>
<li class="toctree-l3"><a class="reference internal" href="modules.html#compiled-python-files">6.1.3. “编译过的”Python文件</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#standard-modules">6.2. 标准模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#the-dir-function">6.3. <code class="docutils literal notranslate"><span class="pre">dir()</span></code> 函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#packages">6.4. 包</a><ul>
<li class="toctree-l3"><a class="reference internal" href="modules.html#importing-from-a-package">6.4.1. 从包中导入 *</a></li>
<li class="toctree-l3"><a class="reference internal" href="modules.html#intra-package-references">6.4.2. 子包参考</a></li>
<li class="toctree-l3"><a class="reference internal" href="modules.html#packages-in-multiple-directories">6.4.3. 多个目录中的包</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="inputoutput.html">7. 输入输出</a><ul>
<li class="toctree-l2"><a class="reference internal" href="inputoutput.html#fancier-output-formatting">7.1. 更漂亮的输出格式</a><ul>
<li class="toctree-l3"><a class="reference internal" href="inputoutput.html#formatted-string-literals">7.1.1. 格式化字符串文字</a></li>
<li class="toctree-l3"><a class="reference internal" href="inputoutput.html#the-string-format-method">7.1.2. 字符串的 format() 方法</a></li>
<li class="toctree-l3"><a class="reference internal" href="inputoutput.html#manual-string-formatting">7.1.3. 手动格式化字符串</a></li>
<li class="toctree-l3"><a class="reference internal" href="inputoutput.html#old-string-formatting">7.1.4. 旧的字符串格式化方法</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="inputoutput.html#reading-and-writing-files">7.2. 读写文件</a><ul>
<li class="toctree-l3"><a class="reference internal" href="inputoutput.html#methods-of-file-objects">7.2.1. 文件对象的方法</a></li>
<li class="toctree-l3"><a class="reference internal" href="inputoutput.html#saving-structured-data-with-json">7.2.2. 使用 <code class="docutils literal notranslate"><span class="pre">json</span></code> 保存结构化数据</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="errors.html">8. 错误和异常</a><ul>
<li class="toctree-l2"><a class="reference internal" href="errors.html#syntax-errors">8.1. 语法错误</a></li>
<li class="toctree-l2"><a class="reference internal" href="errors.html#exceptions">8.2. 异常</a></li>
<li class="toctree-l2"><a class="reference internal" href="errors.html#handling-exceptions">8.3. 处理异常</a></li>
<li class="toctree-l2"><a class="reference internal" href="errors.html#raising-exceptions">8.4. 抛出异常</a></li>
<li class="toctree-l2"><a class="reference internal" href="errors.html#user-defined-exceptions">8.5. 用户自定义异常</a></li>
<li class="toctree-l2"><a class="reference internal" href="errors.html#defining-clean-up-actions">8.6. 定义清理操作</a></li>
<li class="toctree-l2"><a class="reference internal" href="errors.html#predefined-clean-up-actions">8.7. 预定义的清理操作</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="classes.html">9. 类</a><ul>
<li class="toctree-l2"><a class="reference internal" href="classes.html#a-word-about-names-and-objects">9.1. 名称和对象</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes.html#python-scopes-and-namespaces">9.2. Python 作用域和命名空间</a><ul>
<li class="toctree-l3"><a class="reference internal" href="classes.html#scopes-and-namespaces-example">9.2.1. 作用域和命名空间示例</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="classes.html#a-first-look-at-classes">9.3. 初探类</a><ul>
<li class="toctree-l3"><a class="reference internal" href="classes.html#class-definition-syntax">9.3.1. 类定义语法</a></li>
<li class="toctree-l3"><a class="reference internal" href="classes.html#class-objects">9.3.2. 类对象</a></li>
<li class="toctree-l3"><a class="reference internal" href="classes.html#instance-objects">9.3.3. 实例对象</a></li>
<li class="toctree-l3"><a class="reference internal" href="classes.html#method-objects">9.3.4. 方法对象</a></li>
<li class="toctree-l3"><a class="reference internal" href="classes.html#class-and-instance-variables">9.3.5. 类和实例变量</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="classes.html#random-remarks">9.4. 补充说明</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes.html#inheritance">9.5. 继承</a><ul>
<li class="toctree-l3"><a class="reference internal" href="classes.html#multiple-inheritance">9.5.1. 多重继承</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="classes.html#private-variables">9.6. 私有变量</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes.html#odds-and-ends">9.7. 杂项说明</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes.html#iterators">9.8. 迭代器</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes.html#generators">9.9. 生成器</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes.html#generator-expressions">9.10. 生成器表达式</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="stdlib.html">10. 标准库简介</a><ul>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#operating-system-interface">10.1. 操作系统接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#file-wildcards">10.2. 文件通配符</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#command-line-arguments">10.3. 命令行参数</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#error-output-redirection-and-program-termination">10.4. 错误输出重定向和程序终止</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#string-pattern-matching">10.5. 字符串模式匹配</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#mathematics">10.6. 数学</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#internet-access">10.7. 互联网访问</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#dates-and-times">10.8. 日期和时间</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#data-compression">10.9. 数据压缩</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#performance-measurement">10.10. 性能测量</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#quality-control">10.11. 质量控制</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib.html#batteries-included">10.12. 包含电池</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="stdlib2.html">11. 标准库简介 —— 第二部分</a><ul>
<li class="toctree-l2"><a class="reference internal" href="stdlib2.html#output-formatting">11.1. 格式化输出</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib2.html#templating">11.2. 模板</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib2.html#working-with-binary-data-record-layouts">11.3. 使用二进制数据记录格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib2.html#multi-threading">11.4. 多线程</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib2.html#logging">11.5. 日志</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib2.html#weak-references">11.6. 弱引用</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib2.html#tools-for-working-with-lists">11.7. 用于操作列表的工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdlib2.html#decimal-floating-point-arithmetic">11.8. 十进制浮点运算</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="venv.html">12. 虚拟环境和包</a><ul>
<li class="toctree-l2"><a class="reference internal" href="venv.html#introduction">12.1. 概述</a></li>
<li class="toctree-l2"><a class="reference internal" href="venv.html#creating-virtual-environments">12.2. 创建虚拟环境</a></li>
<li class="toctree-l2"><a class="reference internal" href="venv.html#managing-packages-with-pip">12.3. 使用pip管理包</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="whatnow.html">13. 接下来？</a></li>
<li class="toctree-l1"><a class="reference internal" href="interactive.html">14. 交互式编辑和编辑历史</a><ul>
<li class="toctree-l2"><a class="reference internal" href="interactive.html#tab-completion-and-history-editing">14.1. Tab 补全和编辑历史</a></li>
<li class="toctree-l2"><a class="reference internal" href="interactive.html#alternatives-to-the-interactive-interpreter">14.2. 默认交互式解释器的替代品</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="floatingpoint.html">15. 浮点算术：争议和限制</a><ul>
<li class="toctree-l2"><a class="reference internal" href="floatingpoint.html#representation-error">15.1. 表示性错误</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="appendix.html">16. 附录</a><ul>
<li class="toctree-l2"><a class="reference internal" href="appendix.html#interactive-mode">16.1. 交互模式</a><ul>
<li class="toctree-l3"><a class="reference internal" href="appendix.html#error-handling">16.1.1. 错误处理</a></li>
<li class="toctree-l3"><a class="reference internal" href="appendix.html#executable-python-scripts">16.1.2. 可执行的Python脚本</a></li>
<li class="toctree-l3"><a class="reference internal" href="appendix.html#the-interactive-startup-file">16.1.3. 交互式启动文件</a></li>
<li class="toctree-l3"><a class="reference internal" href="appendix.html#the-customization-modules">16.1.4. 定制模块</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>上一个主题</h4>
  <p class="topless"><a href="../whatsnew/changelog.html"
                        title="上一章">更新日志</a></p>
  <h4>下一个主题</h4>
  <p class="topless"><a href="appetite.html"
                        title="下一章">1. 课前甜点</a></p>
  <div role="note" aria-label="source link">
    <h3>本页</h3>
    <ul class="this-page-menu">
      <li><a href="../bugs.html">提交 Bug</a></li>
      <li>
        <a href="https://github.com/python/cpython/blob/3.7/Doc/tutorial/index.rst"
            rel="nofollow">显示源代码
        </a>
      </li>
    </ul>
  </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>导航</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="总目录"
             >索引</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python 模块索引"
             >模块</a> |</li>
        <li class="right" >
          <a href="appetite.html" title="1. 课前甜点"
             >下一页</a> |</li>
        <li class="right" >
          <a href="../whatsnew/changelog.html" title="更新日志"
             >上一页</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <span class="language_switcher_placeholder">zh_CN</span>
          <span class="version_switcher_placeholder">3.7.3</span>
          <a href="../index.html">文档</a> &#187;
        </li>

    <li class="right">
        

    <div class="inline-search" style="display: none" role="search">
        <form class="inline-search" action="../search.html" method="get">
          <input placeholder="快速搜索" type="text" name="q" />
          <input type="submit" value="转向" />
          <input type="hidden" name="check_keywords" value="yes" />
          <input type="hidden" name="area" value="default" />
        </form>
    </div>
    <script type="text/javascript">$('.inline-search').show(0);</script>
         |
    </li>

      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">版权所有</a> 2001-2019, Python Software Foundation.
    <br />
    Python 软件基金会是一个非盈利组织。
    <a href="https://www.python.org/psf/donations/">请捐助。</a>
    <br />
    最后更新于 4月 09, 2019.
    <a href="../bugs.html">发现了问题</a>？
    <br />
    使用<a href="http://sphinx.pocoo.org/">Sphinx</a>1.8.4 创建。
    </div>

  </body>
</html>